feature: modernize controllers with text blocks and refresh README for Java 21 - #72
Merged
devin-ai-integration[bot] merged 1 commit intoAug 6, 2026
Conversation
…r Java 21 Co-Authored-By: alex.vyshetsky <alex.vyshetsky@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
devin-ai-integration
Bot
merged commit Aug 6, 2026
2606361
into
devin/1786033413-java21-boot3-base
1 check failed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Presentation-layer cleanup on top of the Java 21 / Spring Boot 3.5.16 upgrade (#69), plus a README that no longer lies about the project.
HelloControllerheld eight mutable, package-privateStringlabel fields and built its three responses by+-concatenating them across a dozen lines. The labels are nowprivate static final, and the layout is expressed with text blocks +String.formatted(...):The two label-driven endpoints share one
LABELLED_SECTIONS_FORMAT(%s%s× 4) so the section/value interleaving is visible at the call site instead of buried in a concatenation chain.String.valueOf(x)wrappers are gone —%sdoes that.The output must not change (a parallel session is asserting on fragments of these strings), so the whole point is the escaping:
\(line continuation) — otherwise text blocks would insert\nbetween sections;\sterminator, because text blocks strip trailing whitespace per line before escapes are processed. That space is invisible in the source and would otherwise be silently eaten.Verified empirically, not by eyeballing: responses for all endpoints were captured with
curlbefore the change and diffed after./topic,/topic/sort,/topic/{id},/topic/minimum/length/{n},/topic/string/operationand/topic/file/operationare byte-for-byte identical;/datetimeand/differ only in the embedded timestamps and theAtomicLongcounter, and are identical once those are masked. JSON shapes ({"id","subjectName","subjectDescription"}and{"id","content"}) are unchanged, and POST/PUT/DELETE were exercised against the running app.GreetingController:template→TEMPLATE(private static final),String.format(template, name)→TEMPLATE.formatted(name).AtomicLonguntouched.README.mdwas actively misleading: it described a Java 1.8 project, gave no build instructions (the Gradle build is gone), pointed at the upstream repo for cloning, and omitted/datetime,/topic/string/operationand/topic/file/operationfrom the endpoint list. Rewritten to describe the app as it is now — still a Java 8 feature showcase (that is the point of the repo), but running on Java 21 / Boot 3.5.16, built with./mvnw clean verifyand run with./mvnw spring-boot:run, cloned fromCOG-GTM. Added a short "Java 21 idioms in use" section, an endpoint table, a project layout map, and a note that theWARN Could not fetch a quote from gturnquist-quoters.cfapps.ioon startup is expected. Feature claims were checked against the code rather than invented.Verification
./mvnw clean verifypasses on JDK 21.curled and diffed against the pre-change capture as described above.Files outside this slice
None — no changes were needed in files this slice does not own (
pom.xml,src/test/**, model/service/config are untouched).Link to Devin session: https://app.devin.ai/sessions/ec504d4107fe4f738f1deefbbc539df4
Devin Review